package com.damuzee.system.system.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.mybatis.sql.page.Page;
import org.springframework.stereotype.Service;

import com.damuzee.system.system.domain.PermModule;
import com.damuzee.system.system.persistence.PermModuleMapper;
import com.damuzee.system.system.service.PermModuleService;

@Service
public class  PermModuleServiceImpl implements PermModuleService{

	public List<PermModule> getChildList(Long rootId) {
		 
		return mapper.selectChildList(rootId);
	}

	public Page< PermModule> getPermModuleList(Page<  PermModule> page,   PermModule  bean) {
		
		return mapper.selectChildList(page, bean.getModuleId());
	}

	public void savePermModule( PermModule bean) {
		 
		mapper.insert(bean);
	}
	
 
	public List<PermModule> getPermModuleList( PermModule bean) {
		 
		return mapper.selectList(bean);
	}

	 
	public void updatePermModule( PermModule bean) {
		mapper.update(bean); 
	}

 
	@Resource
	private  PermModuleMapper mapper ;
}
